*Programs in low low cluster

clear

use "Data\dataset_with_singles.dta" 

keep if aar==2018 | aar==1980 | aar==1981
drop if final_educ==. | final_educ==1



gen ambition=.
replace ambition=1 if ambition_type_k_4_s==1
replace ambition=2 if ambition_type_k_4_s==4
replace ambition=3 if ambition_type_k_4_s==3
replace ambition=4 if ambition_type_k_4_s==2


*Add variable on immigrant status
sort pnr aar

merge 1:1 pnr aar using "Data\sample1_new.dta", keepusing(opr_land ie_type)

drop if _merge==2


save "Results\tab_B3\Scenario_13\dataset_with_singles_and_immigrants.dta", replace
